Auto merge of #1991 - carols10cents:pipelinify, r=alexcrichton
authorbors <bors@rust-lang.org>
Tue, 22 Sep 2015 01:47:44 +0000 (01:47 +0000)
committerbors <bors@rust-lang.org>
Tue, 22 Sep 2015 01:47:44 +0000 (01:47 +0000)
commitc76a0d3caadd1ddb3c054a79e56d76a5c07020e1
tree7074cefd7a77c0adf8b78494a41a50986601b569
parentecafa40d8ccc5c58b9d59b01df99a3bb3e029d9f
parent8eb0ead58dae33e057b70ee48f36005f536b7f1e
Auto merge of #1991 - carols10cents:pipelinify, r=alexcrichton

Hi! This is an attempt to start refactoring some of the internals to be more like a pipeline, and eventually enable the kind of functionality I tried to add in #1968 without having to add as much duplication. Turns out there's a fair bit of duplication in the code today, I think this helps address it!

I may have totally gone against some abstractions... namely I made a way to create `Package`s from a `manifest_path` and a `config`, without needing a `Source`. I think it cleans up the code quite a bit, and I think makes things a bit more pipeliney in that the `Source` isn't updated until we really need it to be (as opposed to having to use `preload` to avoid updating it again). But I'm open to the possibility that I'm moving things around to where no one who knows the code well will be able to find them ;)

This *should* be a Real Refactor in the sense that these changes don't change behavior-- except in one test case, where the same error happens as did before, but it's going through a `chain_error` now so has a slightly different message.
src/cargo/core/package.rs
src/cargo/core/registry.rs
src/cargo/ops/cargo_clean.rs
src/cargo/ops/cargo_compile.rs
src/cargo/ops/cargo_package.rs
src/cargo/ops/resolve.rs
src/cargo/sources/path.rs